package Demo_zhuanshu01.X10;
import static java.lang.System.out;

public class Arm  implements Runnable
{	
	private static int i = 1;
	public synchronized void run()
	{	
			for(int j = 5 ; j >= 1  ; j-- )
			{	
				out.println(Thread.currentThread().getName() + "-->" + i);
				i++;
			} 
	}
	public static void main(String[] args) throws Exception
	{  
		Arm r = new Arm();
		for(;i<=75;)
		{	
			Thread r1 = new Thread( r , "Thread-1");
			r1.start();
			r1.join();
			Thread r2 = new Thread( r , "Thread-2");
			r2.start();
			r2.join();
			Thread r3 = new Thread( r , "Thread-3");
			r3.start();
			r3.join();
		}
	}
}
